package com.five.wisdomClass.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("sign_info")
@AllArgsConstructor
@NoArgsConstructor
public class SignInfo implements Serializable {

    // id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    // 课程号
    @TableField(value = "course_number")
    private String courseNumber;

    // 教师姓名
    @TableField(value = "teacher_name")
    private String teacherName;

    // 学生学号
    @TableField(value = "s_number")
    private String sNumber;

    // 学生姓名
    @TableField(value = "s_name")
    private String sName;

    // 发布签到时间
    @TableField("post_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "Asia/Shanghai")
    private Date postTime;

    // 实际签到时间
    @TableField("actual_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "Asia/Shanghai")
    private Date actualTime;

    // 签到状态
    @TableField("sign_state")
    private Integer signState;

    // 验证码
    @TableField("code")
    private String code;
}
